]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-theme: ref items in custom stylesheets list
authorRay Strode <rstrode@redhat.com>
Mon, 18 Oct 2010 15:45:34 +0000 (11:45 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 18 Oct 2010 19:52:38 +0000 (15:52 -0400)
st-theme stores some loaded stylesheets in a custom
stylesheets list.  When removing items from this list
it unrefs them, but when adding items to the list it
neglects to ref them.  This means that under certain
circumstances the list will contain items that have
already been freed.

https://bugzilla.gnome.org/show_bug.cgi?id=632477

src/st/st-theme.c

index 4134b758b59e416ef1d45c70e47c2b21de9c0b46..6e2fd2c74d560b8591c37ebff6c6d725f3935c0a 100644 (file)
@@ -320,6 +320,7 @@ st_theme_load_stylesheet (StTheme    *theme,
     return FALSE;
 
   insert_stylesheet (theme, path, stylesheet);
+  cr_stylesheet_ref (stylesheet);
   theme->custom_stylesheets = g_slist_prepend (theme->custom_stylesheets, stylesheet);
 
   return TRUE;